package com.chlitina.store.modules.cash.model;

import com.chlitina.store.modules.base.entity.StoreCare;
import com.chlitina.store.modules.base.entity.StoreSelfCare;
import com.chlitina.store.modules.expert.entity.Care;

public class CareDescription {
	private String name; // 护理名称
	private int duration; // 本护理所需时长
	private String description; // 描述
	private float price; // 护理标准指导价
	private int times; // 护理次数（从1开始的正整数，100之内）
	private int type; // 护理类型：0：面部护理1：身体护理 2：仪器护理
	private int status; // 状态信息 0 - 可用 1 - 不可用

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public int getTimes() {
		return times;
	}

	public void setTimes(int times) {
		this.times = times;
	}

	public float getPrice() {
		return price;
	}

	public void setPrice(float price) {
		this.price = price;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public int getDuration() {
		return duration;
	}

	public void setDuration(int duration) {
		this.duration = duration;
	}

	private void update(Care care) {
		setDescription(care.getDescription());
		setName(care.getName());
		setPrice(care.getPrice());
		setStatus(care.getStatus());
		setTimes(care.getTimes());
		setType(care.getType());
	}

	private void update(StoreSelfCare care) {
		setDescription(care.getDescription());
		setName(care.getName());
		setPrice(care.getPrice());
		setStatus(care.getStatus());
		setTimes(care.getTimes());
		setType(care.getType());
	}

	public void update(StoreCare storeCare) {
		if (storeCare == null) {
			return;
		}
		if (storeCare.getCare_type() == StoreCare.TYPE_SELF) {
			update(storeCare.getStoreSelfCare());
		} else {
			update(storeCare.getCare());
		}
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
}
